package data;

import org.apache.poi.hssf.usermodel.HSSFRow;

/**
 * Created by Валерий on 08.11.2014.
 */
public class TMC {

    public boolean addFromRow(HSSFRow row){
        //Формат файла
        //№ п/п | Инвент. номер | ОС и ДНМА	| Кол-во | Стоимость | Подразделение | Место хранения | МОЛ
        //начинаем читать со второй строки

        try {
            this.accountNumber = row.getCell(0).getStringCellValue();
            this.inventoryNumber = row.getCell(1).getStringCellValue();
            this.tmcName = row.getCell(2).getStringCellValue();
            this.tmcNumber = row.getCell(3).getStringCellValue();
            this.tmcCost = row.getCell(4).getStringCellValue();
            this.department = row.getCell(5).getStringCellValue();
            this.storageLocation = row.getCell(6).getStringCellValue();
            this.tmcAccountable = row.getCell(7).getStringCellValue();
        }catch (Exception e){
            return false;
        }
        return true;
    }

    public String getAccountNumber() {
        return accountNumber;
    }

//    public void setAccountNumber(String accountNumber) {
//        this.accountNumber = accountNumber;
//    }

    public String getInventoryNumber() {
        return inventoryNumber;
    }

//    public void setInventoryNumber(String inventoryNumber) {
//        this.inventoryNumber = inventoryNumber;
//    }

    public String getTmcName() {
        return tmcName;
    }

//    public void setTmcName(String tmcName) {
//        this.tmcName = tmcName;
//    }

    public String getTmcNumber() {
        return tmcNumber;
    }

//    public void setTmcNumber(String tmcNumber) {
//        this.tmcNumber = tmcNumber;
//    }

    public String getTmcCost() {
        return tmcCost;
    }

//    public void setTmcCost(String tmcCost) {
//        this.tmcCost = tmcCost;
//    }

    public String getTmcAccountable() {
        return tmcAccountable;
    }

//    public void setTmcAccountable(String tmcAccountable) {
//        this.tmcAccountable = tmcAccountable;
//    }

    //Поля из бухг учета
    private String accountNumber;
    private String inventoryNumber;
    private String tmcName;
    private String tmcNumber;
    private String tmcCost;
    private String department;
    private String storageLocation;
    private String tmcAccountable;


}
